<template>
  <div class="advisory">
         <div class="researchleft2">
             <img src="http://img3.tqcaifu.com/img/linshi2.jpg" alt="">
         </div>
         <el-row :gutter="10" class="checktitle">
            <el-col :span="5">
                <advisory2 :newdata="newslist6"></advisory2>
            </el-col>
            <el-col :span="13">
                 <advisory3 :firstnews="news8" :newdata="newslist4" :show="true"></advisory3>
                 <advisory3 :firstnews="news9" :newdata="newslist5" :show="false"></advisory3>
            </el-col> 
            <el-col :span="6">
                  <advisory4 :newdata="newslist7"></advisory4>
            </el-col>
         </el-row>
         <!-- <div class="add">
           <nuxt-link target="_blank" to="/advisory">
                <img src="http://img3.tqcaifu.com/img/add2.png" alt="">
           </nuxt-link>
         </div> -->
    <newsdetail :newinfo="newsdetail" :newslist1="newslist1" :newslist2="newslist2" :newslist3="newslist3"></newsdetail>
  </div>
</template>

<script>
import asyncApi from '../../static/js/asyncApi.js'
import advisory2 from "../../components/advisory2";
import advisory3 from "../../components/advisory3";
import advisory4 from "../../components/advisory4";

import newsdetail from "../../components/newsdetail";

export default {
  components:{
        newsdetail,
        advisory2,
        advisory3,
        advisory4
    },
  data() {
    return{
      newsdetail:{
        title1:"宏观新闻",
        title2:"财经新闻",
        title3:"市场新闻",
        title11:"/column/hongguanxinwen",
        title22:"/column/caijingxinwen",
        title33:"/column/shichangxinwen",
        minititle1:"--观宏观大势，把握市场发展趋势",
        minititle2:"--观财经实时热点，紧握当下投资机会",
        minititle3:"--观市场变幻，抓住最佳投资时机",
        type:3
      },
      research1link:"/column/caijingtoutiao"
    }
  },
  mounted(){

  },
  async asyncData () {
    let [data3,data4,data5,data6,data7,data8,data9] = await Promise.all([
        asyncApi.asyncGetCategoryPost({categoryName:"宏观新闻",page:"1",pageSize:"6",orderBy:"createtime",orderByType:"desc"}),
        asyncApi.asyncGetCategoryPost({categoryName:"财经新闻",page:"1",pageSize:"6",orderBy:"createtime",orderByType:"desc"}),
        asyncApi.asyncGetCategoryPost({categoryName:"市场新闻",page:"1",pageSize:"6",orderBy:"createtime",orderByType:"desc"}),
        asyncApi.asyncGetCategoryPost({categoryName:"财经头条",page:"1",pageSize:"8",orderBy:"createtime",orderByType:"desc"}),
        asyncApi.asyncGetCategoryPost({categoryName:"每日财讯",page:"1",pageSize:"9",orderBy:"createtime",orderByType:"desc"}),
        asyncApi.asyncGetCategoryPost({categoryName:"名家观点",page:"1",pageSize:"22",orderBy:"createtime",orderByType:"desc"}),
        asyncApi.asyncGetCategoryPost({categoryName:"财经头条",page:"1",pageSize:"2",orderBy:"weigh",orderByType:"desc"}),
    ])
    return {
      newslist1:data3.data.data.list,
      newslist2:data4.data.data.list,
      newslist3:data5.data.data.list,
      newslist4:data6.data.data.list.slice(0,4),
      newslist5:data6.data.data.list.slice(4,8),
      newslist6:data7.data.data.list,
      newslist7:data8.data.data.list,
      news8:data9.data.data.list.slice(0,1),
      news9:data9.data.data.list.slice(1,2)
    }
 },
 head () {
    return {
      title: "财经热点资讯",
      meta: [
         { hid:"keywords",name: 'keywords', content: '' },
         { hid:"description",name: 'description', content: '' }
      ]
    }
  }
};
</script>


<style scoped>
.advisory{
  width: 1200px;
  margin: 0 auto;
}
.researchleft2{
 margin: 10px 0;
  width: 100%;
}
.researchleft2 img{
  width: 100%;
}
.checktitle{
  margin-top: 10px;
}
.add{
  margin: 10px 0;
}
</style>
